#!/bin/bash
cd $(cd `dirname $0`/..; pwd)

DATA_URL=https://dblp.org/xml/
if [ ! -n "$1" ]; then
    DATA_NAME=dblp
else
    DATA_NAME=dblp-$1
    DATA_URL=${DATA_URL}release/
fi
DATA_URL=${DATA_URL}${DATA_NAME}.xml.gz
echo DATA_URL: $DATA_URL

wget ${DATA_URL}
wget ${DATA_URL}.md5
md5sum -c ${DATA_NAME}.xml.gz.md5
7z x ./${DATA_NAME}.xml.gz
head -n 20 ./${DATA_NAME}.xml
